CC      =g++
TARGET  =v4l2_ipc_live555
DIR_INC =${PWD}/include
DIR_SRC =${PWD}/src
DIR_OBJ =${PWD}/obj
THIRD_LIB_IDR=-L/usr/local/lib -L/home/lqf/ffmpeg6.0_build/lib
THIRD_LIB_INC=-I/home/lqf/ffmpeg6.0_build/include  -I/usr/local/include -I/usr/local/include/groupsock -I/usr/local/include/UsageEnvironment
THIRD_LIB=-lliveMedia -lBasicUsageEnvironment -lgroupsock -lUsageEnvironment -lx264 -lavcodec -lavformat -lswscale -lavutil  
SRC	=$(wildcard ${DIR_SRC}/*.cpp)
OBJ	=$(patsubst %.cpp,${DIR_OBJ}/%.o,$(notdir ${SRC}))
CFLAGS	= -std=c++11 -g -I$(DIR_INC) $(THIRD_LIB_INC) $(THIRD_LIB_IDR)  $(THIRD_LIB) 

${TARGET}:${OBJ}
	$(CC)   -o      $@      $^      $(CFLAGS)  
${DIR_OBJ}/%.o:${DIR_SRC}/%.cpp
	$(CC)   $(CFLAGS)       -c      $<      -o      $@
.PHONY:clean
clean:
	rm -rf  ${DIR_OBJ}/*.o
	rm -rf  ./main
